package com.liyuhang.service;

import com.liyuhang.dao.UserDao;
import com.liyuhang.domain.User;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    private UserDao userDao=new UserDao();

    public boolean login(User user) {
       User loginUser = userDao.findUserByUsername(user.getUsername());
        return loginUser != null && loginUser.getPassword().equals(user.getPassword());
    }
}
